package com.xyoto.community.enums;

/**
 * @Author lin
 * @Date 2021/9/30 21:10
 */
public enum TopicEnum implements Code {

    /**
     * 话题 10040-1080
     */
    TOPIC_CREATE_FAIL(1041,"话题创建失败"),
    USER_ACTIVITY_NOT_ENOUGH(1042,"用户活跃度不足"),
    TOPIC_NOT_EXIST(1043,"话题不存在"),
    TOPIC_DELETE_FAIL(1044,"删除话题失败"),
    TOPIC_TITLE_NOT_NULL(1045, "创建话题的标题不能为空"),
    TOPIC_CONTENT_NOT_NULL(1046,"创建话题的内容不能为空"),
    HOT_TOPIC_CREAT_FAIL(1047, "创建热门话题失败"),
    HOT_TOPIC_UPDATE_FAIL(1048, "更新热门话题失败"),
    REQUEST_NOT_ALLOWED(1049,"请求不允许（别想了，这个接口现在不开放）"),
    TOPIC_PICTURE_NOT_NULL(1050,"请上传一张此话题的图片"),
    TOPIC_SAVE_ERROR(1051,"话题更新保存到数据库失败"),
    ;

    private int code;
    private String msg;

    TopicEnum(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}
